package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.entity.DishFlavor;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface DishFlavorMapper {

    /**
     * 插入菜品对应口味
     * @param dishFlavor
     */
    @Insert("insert into dish_flavor(dish_id, name, value) values" +
            "(#{dishId}, #{name},#{value})")
    void save(DishFlavor dishFlavor);

    /**
     * 删除菜品对应口味
     * @param ids
     */
    void delete(List<Long> ids);

    /**
     * 根据id查询菜品信息
     * @param id
     * @return
     */
    @Select("select * from dish_flavor where dish_id = #{id}")
    List<DishFlavor> selectDishFlavorById(Long id);
}
